package io;

import java.io.*;

public class Test4 {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("E:\\heima\\b.txt"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("E:\\heima\\a.txt"));

        byte [] bytes =new byte [1024];
        int len;
        while ((len=bis.read(bytes))!=-1){
            bos.write(bytes,0,len);
        }
        bis.close();
        bos.close();
    }
}
